package com.siam.package_rider.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.siam.package_order.entity.Order;
import com.siam.package_rider.entity.TbDeliveryOrder;
import com.siam.package_rider.model.param.TbDeliveryOrderParam;
import com.siam.package_common.service.CurdService;
import com.siam.package_rider.model.result.TbDeliveryOrderResult;

import java.text.ParseException;
import java.util.Map;

/**
 * ---------------------------
 * 配送订单表 (TbDeliveryOrderService)         
 * ---------------------------
 * 作者：  高品
 * 时间：  2025-03-29 18:55:18
 * ---------------------------
 */
public interface TbDeliveryOrderService extends CurdService<TbDeliveryOrder, TbDeliveryOrderParam> {

    Page<TbDeliveryOrderResult> page(TbDeliveryOrderParam.DeliveryOrderPageRequest request);

    void grabOrder(TbDeliveryOrderParam.GrabOrderRequest request);

    Page<TbDeliveryOrderResult> pageRiderOrder(TbDeliveryOrderParam.RiderOrderPageRequest request);

    void transferOrder(TbDeliveryOrderParam param);

    TbDeliveryOrderResult orderDetail(TbDeliveryOrderParam param);

    Map selectAllTabWaitHandleNum(TbDeliveryOrderParam param);

    Map statistic(TbDeliveryOrderParam param) throws ParseException;

    void updateStatus(TbDeliveryOrderParam param);

    void refuse(TbDeliveryOrderParam param);

    void confirmToStore(TbDeliveryOrderParam param);

    void confirmPickUp(TbDeliveryOrderParam param);

    void confirmDelivery(TbDeliveryOrderParam param);

    TbDeliveryOrder selectByOriginOrderId(int originOrderId);
}